package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"jd-mall/api/internal/config"
	"jd-mall/jd-srv/jdclient"
)

type ServiceContext struct {
	Config config.Config
	Jd     jdclient.Jd
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		Jd:     jdclient.NewJd(zrpc.MustNewClient(c.Jd)),
	}
}
